home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_6 / SUN4PROM.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  4KB  |  84 lines

  1. /*
  2.  * sun4prom.h -- interface to sun4 PROM monitor.  We don't use most of this,
  3.  *               so most of these are just placeholders.
  4.  */
  5.  
  6. #ifndef _SUN4PROM_H_
  7. #define _SUN4PROM_H_
  8.  
  9. /*
  10.  * Although this looks similar to an romvec for a OpenProm machine, it is 
  11.  * actually closer to what was used in the Sun2 and Sun3.
  12.  *
  13.  * V2 entries exist only in version 2 PROMs and later, V3 in version 3 and later.
  14.  * 
  15.  * Many of the function prototypes are guesses.  Some are certainly wrong.
  16.  * Use with care.
  17.  */
  18.  
  19. typedef struct {
  20.     char        *initSP;        /* Initial system stack ptr */
  21.     void        (*startmon)(void);    /* Initial PC for hardware */
  22.     int        *diagberr;        /* Bus err handler for diags */
  23.     struct linux_arguments_v0 **bootParam; /* Info for bootstrapped pgm */
  24.      unsigned int    *memorysize;        /* Usable memory in bytes */
  25.     unsigned char    (*getchar)(void);    /* Get char from input device */ 
  26.     void        (*putchar)(char);    /* Put char to output device */
  27.     int        (*mayget)(void);    /* Maybe get char, or -1 */
  28.     int        (*mayput)(void);    /* Maybe put char, or -1 */
  29.     unsigned char    *echo;            /* Should getchar echo? */
  30.     unsigned char    *insource;        /* Input source selector */
  31.     unsigned char    *outsink;        /* Output sink selector */
  32.     int        (*getkey)(void);    /* Get next key if one exists */
  33.     void        (*initgetkey)(void);    /* Initialize get key */
  34.     unsigned int    *translation;        /* Kbd translation selector */
  35.     unsigned char    *keybid;        /* Keyboard ID byte */
  36.     int        *screen_x;        /* V2: Screen x pos (r/o) */
  37.     int        *screen_y;        /* V2: Screen y pos (r/o) */
  38.     struct keybuf    *keybuf;        /* Up/down keycode buffer */
  39.     char        *monid;            /* Monitor version ID */
  40.     void        (*fbwritechar)(char);    /* Write a character to FB */
  41.     int        *fbAddr;        /* Address of frame buffer */
  42.     char        **font;            /* Font table for FB */
  43.     void        (*fbwritestr)(char *);    /* Write string to FB */
  44.     void        (*reboot)(char *);    /* e.g. reboot("sd()vmlinux") */
  45.     unsigned char    *linebuf;        /* The line input buffer */
  46.     unsigned char    **lineptr;        /* Cur pointer into linebuf */
  47.     int        *linesize;        /* length of line in linebuf */
  48.     void        (*getline)(char *);    /* Get line from user */
  49.     unsigned char    (*getnextchar)(void);    /* Get next char from linebuf */
  50.     unsigned char    (*peeknextchar)(void);    /* Peek at next char */
  51.     int        *fbthere;        /* =1 if frame buffer there */
  52.     int        (*getnum)(void);    /* Grab hex num from line */
  53.     int        (*printf)(char *, ...);    /* See prom_printf() instead */ 
  54.     void        (*printhex)(int);    /* Format N digits in hex */
  55.     unsigned char    *leds;            /* RAM copy of LED register */
  56.     void        (*setLEDs)(unsigned char *);    /* Sets LED's and RAM copy */
  57.     void        (*NMIaddr)(void *);    /* Addr for level 7 vector */
  58.     void        (*abortentry)(void);    /* Entry for keyboard abort */
  59.     int        *nmiclock;        /* Counts up in msec */
  60.     int        *FBtype;        /* Frame buffer type */
  61.      unsigned int    romvecversion;        /* Version number for this romvec */
  62.     struct globram  *globram;        /* monitor global variables ??? */
  63.     void *        kbdaddr;        /* Addr of keyboard in use */
  64.     int        *keyrinit;        /* ms before kbd repeat */
  65.     unsigned char    *keyrtick;         /* ms between repetitions */
  66.     unsigned int    *memoryavail;        /* V1: Main mem usable size */
  67.     long        *resetaddr;        /* where to jump on a reset */
  68.     long        *resetmap;        /* pgmap entry for resetaddr */
  69.     void        (*exittomon)(void);    /* Exit from user program */
  70.     unsigned char    **memorybitmap;        /* V1: &{0 or &bits} */
  71.     void        (*setcxsegmap)(int ctxt, char *va, int pmeg);    /* Set seg in any context */
  72.     void        (**vector_cmd)(void *);    /* V2: Handler for 'v' cmd */
  73.     unsigned long    *expectedtrapsig;    /* V3: Location of the expected trap signal */
  74.     unsigned long    *trapvectorbasetable;    /* V3: Address of the trap vector table */
  75.     int        unused1;
  76.     int        unused2;
  77.     int        unused3;
  78.     int        unused4;
  79. } linux_sun4_romvec;
  80.  
  81. extern linux_sun4_romvec *sun4_romvec;
  82.  
  83. #endif /* _SUN4PROM_H_ */
  84.